Support both legacy and new versions of mint