Add protocol implementation for js/Window conditionally

Phantomjs has no js/Window, so generated code would fail on load without
the check.
Merge branch 'fix/phantomjs_has_no_window' of https://github.com/hsalokor/dommy into hsalokor-fix/phantomjs_has_no_window