Changes needed for FastCGI on OSX

Summary: The rest of the changes have been PRed in hhvm-third-party, @ptarjan would look at those. They must land first.
Closes #2944

Reviewed By: @ptarjan

Differential Revision: D1401477

Pulled By: @JoelMarcey