Exactly solvable model mimicking the H2 molecule in the limit of large nuclear masses