Light localization induced by a random imaginary refractive index