I use `globalObj = (function () { return this })()` as cross-platform variant, returns global object in Node.js modules and window object in the browser.