patched array/iarray_allocate.c and fmt/fmt_escapecharxml.c for OS X/clang compatility