Polyfill for requestanimationframe