use the cross browser way of getting the implementation of
cancelAnimationFrame.