Effect of the imaginary part of the pion self-energy on dilepton production in dense nuclear matter