Fix setting window and XMLHttpRequest in chrome web workers

Fix setting window and XMLHttpRequest in chrome web workers (issue https://github.com/freedomjs/freedom-social-xmpp/issues/47).  The problem was that in Chrome web workers global is undefined.

Tested in demo_google app (verified that socialprovider.js could now be loaded and login to Google works again)