This change introduces support for glibc versions older than 2.17 where secure_getenv was introduced.
Add alternative strndup implementation