Polanco lifts Pirates with walk-off hit in 10th inning