polyfill for request animation frame