Polyfill and wrapper on windon.requestAnimationFrame to provide animation loops