Use local rAF instead of window.rAF