Gap-states distribution of ion-implanted Si and GaAs from subgap absorption measurements