fixes iOS crasher

iOS Safari has buggy support for `document.implementation.createHTMLDocument`, let's not use that.
Bonus support for IE8.