Fix #document importing for all browsers.

Safari doesn't know document.children...