Uses thread_local when possible
Boost 1.57 has built-in valgrind support