Fix master--HepMC2 nightly compilation
Follows !59862 (merged), which broke the compilation of the master--HepMC2 nightly. No effect on the HepMC3 build, so the CI won't see any code change.
Follows !59862 (merged), which broke the compilation of the master--HepMC2 nightly. No effect on the HepMC3 build, so the CI won't see any code change.