Cleanup and small fixes after merge.
Google test API requires pthread support.