fix animationend on safari