mimic connect_timeout option fallback from environment variable