Seismic modeling, inversion, and imaging in attenuating media