build.cmd: improved compatibility between release Mercury and Dev