Bugfix: change a variable from int to size_t.

It caused a segmentation fault in iconv, which expected a *size_t but
was receiving an int.