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