Ensure pthread is linked for pthread_* checks