Added support for setting CredentialProvider when building HttpClient.