Add -pthread to clang flags for unit tests