Fix support for non-glibc libcs.