Guard against animating unmounted component

If cmp is not mounted, setState will error.
Merge pull request #4 from ahacop/master

Guard against animating unmounted component