Added checking for pthreads on linux