Republican McCormick wins Pa. Senate race, flips seat