Fixed detection of animationend when not using Modernizr