Fix MSVC-64 warnings about size_t -> int truncations in C++-lib.

Change-Id: Ibe6f41ac15df1ec685b0d0766ff568abf6f3ae7e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>