Work around gcc 4.8.0 issue on ppc64

Change iteration to use size_t instead of int.  The code should be
equivalent in all reasonable cases, but the original way this was
coded was causing a test failure with gcc 4.8.0 on ppc64.  See
https://bugzilla.redhat.com/show_bug.cgi?id=915321 for additional
information.