Check if _wp_http_referer is empty and return  unchanged if so. Fixes #1758