librpc/ndr: correctly implement ndr_charset_length()