only call apache_setenv if it's available, fixes #318
Merge pull request #337 from trans1t/master

Only call apache_setenv() if it's available.

This prevents fatal errors when PHP is compiled differently, or when Apache is not being used.