Link to pthreads the correct way