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.
Merge pull request #491 from pwnall/web-workers

Fix loading in Web Workers.