Effects of imaginary potentials on spurious resonances in resonating-group calculations☆