refactor jQuery noConflict mode and definition detection