Always compile with -pthread.