Enable <thread> for gcc-4.8 and later.
Disable thread support headers depending on values of internal libstdc++ macros.