Allow environment variables to be accessed via `getenv()` function.

Signed-off-by: crynobone <crynobone@gmail.com>
Merge pull request #3496 from crynobone/feature/putenv

Allow environment variables to be accessed via `getenv()` function.