handle in html5.h the fact that document, like window, does not have getBoundingClientRect; fixes #3060