Resolve JS hint errors

Minor touch up so it passes validation
Looking at this twitter discussion:
https://twitter.com/kriskowal/status/269958079217561600

It looks like `Function('return this')()` could simply be replaced by  `window || global` (would also be Content Security Policy compatible). Works in browser, but I haven't tested if it works in Node.js.