Added legacy browser support for requestAnimationFrame()