Provide strnlen() on mingw32 which doesn't have it.