Fixed some incompatible size_t -> int casts.

At least on OSX 10.9, size_t is ulong and is not convertible to uint or int.

Tested with DMD 2.066 & LDC2 0.15.0-alpha1 (DMD v2.066.1, LLVM 3.5.0)