Wrap shim code into an anonymous function (for perf)
Call animation frame tick function directly instead of fetching from global object for perf boost