Add compiler flag to pthread