you probably want to move this shim out of the running code, and put it all the way at the top instead (ideally, make it its own file like requestAnimationShim.js and then simply require it in)