Study of d + d scattering with the resonating-group method and an imaginary potential