Restore global fields explicitly
Fix browser test

window.hasOwnProperty may not work as expected.

On Firefox and Chrome, the test runs. On Safari, it does not.
Mark the test stable