Made compatible with older versions of jQueryUI