Add setEnv/unsetEnv to System.Environment; fixes #7427

Patch from Simon Hengel.