Hack core.js to support Chrome correctly