NEXUS-6094: Be safe with Maven2

That lacks this method from MavenSession.