Case folding support for environments without mbstring

Per the spec, reference link matching is done by normalizing the label with a Unicode case fold, which mb_strtoupper provides.

But since not all systems have the relevant extension installed, we need to manually implement this logic by converting characters according to this table: http://www.unicode.org/Public/UNIDATA/CaseFolding.txt