make match_prefix() case-insensitive