Fix environ enumeration on Apple platforms
Fix environ enumeration on Apple platforms

Summary:
environ is documented to not work very well from .dylib-s (dynamic libraries) on macOS. Use the _NSGetEnviron function instead to get a pointer to environ.

<crt_externs.h> is missing from some iOS SDKs, so forward-declare _NSGetEnviron in such cases.

Reviewed By: Orvid, mzlee

Differential Revision: D4491044

fbshipit-source-id: 886d19bdd63dea14225992446b7ba132faf35054

charsyam/folly,facebook/folly,charsyam/folly,floxard/folly,facebook/folly,rklabs/folly,floxard/folly,floxard/folly,Orvid/folly,facebook/folly,Orvid/folly,Orvid/folly,rklabs/folly,charsyam/folly,Orvid/folly,floxard/folly,rklabs/folly,facebook/folly,rklabs/folly,Orvid/folly,rklabs/folly,charsyam/folly,facebook/folly,floxard/folly