Don't depend on registerPackage function in Cabal
More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage.
It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces.