Pirates sign ex-Dodgers champion pitcher in free agency