Adding requestAnimationFrame polyfill to support older browsers (forgot to add it to this project since it was an external polyfill in other cases).