fixes a few issues with spidermonkey 19