Fix thread linking for gtest under ubuntu.

This issue is a regression introduced in the last commit.
Merge pull request #4 from xiaotianrandom/fix_thread_linking

Fix thread linking for gtest under ubuntu again