Fix warnings about truncation from size_t to int (MSVC2010/64bit).