More reliable method of `window` obtainment

This is my motivation: I'm using CommonJS modules and in such modules `this` outside functions points to a `module.exports` object, not `global` (or `window`).