Global loop handling using raf.js.