Use `window` over `this` (fixes Browserify)

This fixes behavior in Browserify, where `this` is the module global object, not `window`. If `window` is not available, we will fall back to `this` (maintains support for web workers).

See https://github.com/paulmillr/console-polyfill/pull/6