Bedard pitches 5 innings, Pirates and Orioles tie