Fix C++11 library check's thread dependency