simplify requestAnimationFrame polyfill