Quick fix to make it work with latest versions of jQuery.