Add the -pthread flag