Fix browser test

window.hasOwnProperty may not work as expected.

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