Hide strnlen() when building with MAC_OS_X >= 10.7.

strnlen() is defined in osx 10.7 and later but not in previous version. The definition causes a conflict in osx 10.7 and later.