Nationals end skid with walk-off win over Mets