-pthread flag added