Added support for Date.now() for older browsers