refactor: use document.documentMode to determine msie version

Closes #9398