TS-1732 Do an ugly const_cast to work around an anomaly on Solaris.
On linux, this cast is a "no-op", since the struct option is sane
and the compile with convert it back to a const char*. Always doing
the const_cast avoids #ifdef's to maintain.
TS-1860 cacheurl doesn't compile on platforms with pcre/pcre.h (e.g.
solaris).