Ajax: Don't use bare location, it breaks Node with jsdom

Tests not included; the proper fix is coming to the master branch.