CRM-15524 - Avoid loading profileSelector scripts in ajax mode

This commit tweaks the call of CRM_Core_Resources::isAjaxMode to use the simpler static method.