Fix window object not being detected in runtime.
Merge pull request #441 from ajhager/raf_detection

Fix window object not being detected in runtime.