Compiles in pthreads when available.