Define _POSIX_C_SOURCE to get access to strdup() and strndup().