Fix the C++11 thread linking issues for unit tests as well.