Mets ride Dickey to 3-2 win over Pirates