ajax returns a Q promise if it detects Q