Added check for function apache_request_headers

Added check for function [apache_request_headers](http://php.net/manual/en/function.apache-request-headers.php) since it isn't available when PHP runs as [FPM](php.net/manual/en/book.fpm.php).