remove residual pthread references, but restore in build for gtest

gtest depends on pthread in Ubuntu 14.04