Browser compatibility for requestAnimationFrame