Use thread_local only if GCC > 4.8