Proposition to fix issue #2

As said in the issue #2 when php is running as CGI and not an pache mod the following error appears:

> Call to undefined function getallheaders() on line 26

In the pull request I declare the function getallheaders when it doesn't exist.