Add pre-build hook to make this work with v2 cartridge format.