Fix problem with http client not being created in a thread safe manner.