memmem, memrchr and strnlen are all documented as as glibc extensions to the standard library. Compiler support libraries shouldn't be using them: you can't assume that the system C library is glibc.
Some very minor problems, these fcuntions should be found by autoconf instead of being staticly included.
Please try now.