Allow setting the HTTP proxy via creation info

If the user provides a proxy via the info object it is used
in favor over the http_proxy environment variable.
Subject: [PATCH 2/2] Check if getenv() exists

Do not call getenv() on platform which do not support it