Add custom function apache_request_headers for Nginx users

Check if the function apache_request_headers exists and if not, make us of the custom apache_request_headers function.