Using os.getenv() avoids a crash if HTTP_PROXY or HTTPS_PROXY environment variables haven't been set