Added -pthread flag.