The geometric R-matrix for affine crystals of type A