Ensure works with older Maven versions still

Accidentally made hard reference to MockCreationSettings, which did not
exist in earlier maven versions.

Now only load the class where we believe we need it.