The line:
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION is creating /usr/bin/ld: glob.c:(.text+0x4b1): undefined reference to __alloca`` errors.
Changing it to # if _GNU_GLOB_INTERFACE_VERSION >= GLOB_INTERFACE_VERSION seems to correct it.