Fix PhantomJS errors after IE fixes.
Fix cancelAnimationFrame 'not called on window' error in Chrome.