Fix loading in Web Workers.

When sinon.js is loaded via an importScript in a Web Worker, "this" is
not set to the global object. This caused an exception in
fake_xml_http_request.js, which calls  XMLHttpRequest.

The change fixes the global parameter passed to the
fake_xml_http_request module and adds a missing check before the
XMLHttpRequest constructor is called.