Generalised adiabatic connection in ensemble density-functional theory for excited states: example of the H2 molecule