Smoak singles in winning run, M's beat Giants 2-1