support web-workers XMLHttpRequest
for a web-worker, window is unavailable butXMLHttpRequest is available on the global 'self' object