Added missing include for pthread.h