Giants beat Dodgers 2-1, sending Kershaw to loss