Nonlinear optical properties of CdHg(SCN)4 and ZnHg(SCN)4