Doesn't look right that the argument is ignored and instead global
state is modified. The code later passes in `window.console` anyway,
so this doesn't really change the behavior.
However this change is important for Node.js compatibility, where
`window` is not defined.