add MD5-hash matching (bug #4764, with mods)