Changes to support multithreaded use with Apache HTTP.