Fix link on linux (-lm)
Add animation loop detection script.
Fix buggy animation looping math.