fix for detecting if jquery ui is loaded