Shim for requestAnimationFrame