Use the requestAnimationFrame polyfill.

Thanks @kittens for pointing it out.