Use strlen instead of strnlen, for compatibility with some systems