Compile in strnlen portability fixes