CMake: pthread is used only on Unix.