x64-upstream: Use os.environ instead of os.putenv