Add cancelAnimationFrame as it is the primary way to cancel Fixed #796

cancelAnimationFrame was missing and it causes an error in Chrome.
Merge pull request #797 from kevinsimper/cancelAnimationFrame

Add cancelAnimationFrame as it is the primary way to cancel Fixed #796