Check if the chrome variable exists before trying to use it. Safari doesn't like this.
Move the polyfill for Number.isFinite from stdlib to safari. It didn't seem to be working where it was and I think safari is the only one that needs this polyfill