Allow importing es6-shim.js in web worker (fix #247)

This is to address issue #247 in which because es6-shim.js uses window it can't be imported in a web worker. 

I've replaced usage of ```window``` with ```self``` when it would work in a web worker, or test if window is available for the zeroTimeout function which wouldn't work in a web worker. I've added a simple test that only verifies that ```importScripts('es6-shim.js')``` doesn't throw, but I'm new to mocha & BDD so it may look strange.