Fix bug w/ change in animationFrames API