Windows build fix.

SSIA. Fixes "signed unsigned mismatch" compilation warnings.
Merge pull request #2265 from pozdnyakov/win_build

Windows build fix.