Revert "changed document.write to use document.createElement('script')"

This reverts commit 8b1fd7d49c278d43b34b4c041f1575a1a39a664d.

This is necessary because it causes rendering issues on some ICS
devices.