build.cmd: now uses more generic algorithm to detect mmc