[BUG #7882] Check for document.defaultView