Added function for getting request animation frame taking into account vendor prefixes with a fallback of setTimeout