Added back support for browsers without requestAnimationFrame