Added backwards support for request animation frame