update requestAnimationFrame detection
Merge pull request #2 from james2doyle/optimize-raf

update requestAnimationFrame detection. Also closes #1.