Barajas' homer lifts Pirates past Nationals 5-4