Fixes #6258: Pagination uses HTTP referrer as default base_url for Ajax requests