Frazier signs contract with Pittsburgh Pirates