fix compatibility with firefox/spidermonkey engine