Fixed broken compatibility with older versions of jQuery.