Check for -lpthread.