Fixed some incompatible size_t -> int casts.
Merge pull request #5 from gyulalaszlo/fix_bad_int_casts

Fixed some incompatible size_t -> int casts.