A polyfill for window.requestAnimationFrame