Excitons in the layered insulators ZnI2 and CdI2:Zn