Fix animations when using jQuery >= 1.7.2 and jQuery UI >= 1.9.1