Better behavior for window globals (compatibility with existing unit tests)