Properly support gcc 4.7 in C++11 (no thread_local yet)