fix #1779 Chrome 61 has document.scrollingElement = document.documentElement
fix #1779 Chrome 61 has document.scrollingElement = document.documentElement

In Chrome 61, as specified in
https://blog.chromium.org/2017/08/chrome-61-beta-javascript-modules.html:
To align with the spec and preserve browser consistency,
the scrollingElement is now the documentElement in standards mode.

This commit fixes the problems caused by this change in Chrome 61 by first
using document.scrollingElement before relying on a browser-dependent
logic to determine which is the scrolling element.

divdavem/ariatemplates,benouat/ariatemplates,ymeine/ariatemplates,ymeine/ariatemplates,ariatemplates/ariatemplates,fbasso/ariatemplates,fbasso/ariatemplates,benouat/ariatemplates,ariatemplates/ariatemplates,fbasso/ariatemplates,divdavem/ariatemplates,ymeine/ariatemplates,divdavem/ariatemplates,benouat/ariatemplates,ariatemplates/ariatemplates