Dimerization of p-substituted benzoic acids