Effect of solvent polarity on the potential of mean force between two molecular ions: MD simulation