Add -lpthreads to CMake build file.
Fixes link step of the test/benchmarking utilities on some platforms.