I think I figured out the original issue as well. This only works (at least on this OS) if the feature is actually present :
if (requestAnimationFrame) // do something
And it breaks the script when not. So changing it makes using both ‘doc ready’ and immediately invoked functions possible :
if (window.requestAnimationFrame) // do something
Checking support for prefixed versions is a bit too much for the small base that it would serve these days in my opinion.