document.documentMode is 5 if the browser is in quirks mode. Only test for document.documentMode === 7