The role of defects in the diffusion and activation of impurities in ion implanted semiconductors