compat/fnmatch: fix off-by-one character class's length check