Add strndup() function, if we don't have it