Do not override the referer upon Ajax requests (see #5956)