Giants top Royals 2-1 in 11 innings