Change loop variable type for compatibility.

Change from size_t to unsigned long to avoid
compatibility problems with format specifier,
and silence warning from type coercion.