Nolasco, Marlins top Giants 2-1 to halt skid at 7