Measuring the light-attenuation coefficients of germanium and paratellurite crystals