Link the thread test to pthread.