fix checking for perf.now() in raf callback