Ion implantation of zirconium and hafnium in InP and GaAs