DynamicSql: pthread based TLS for compatibility with pre-C++11 compilers