Fix warnings about narrowing conversions on 64-bit systems with 32-bit int.
Merge pull request #123 from MarekKurdej/fix/narrowing-conversion-warnings

Fix warnings about narrowing conversions on 64-bit systems with 32-bit int