Added polyfill for requestAnimationFrame