An exact correspondence between plane piezoelectricity and generalized plane strain in elasticity