add support for node-webkit

Browsers will always have `window` and possibly `global` with node-webkit.
Node will never have `window` but always have `global`.