Silence some Windows compiler warnings

by adding explicit type casts.
Merge pull request #79 from Tilka/nits

Silence some Windows compiler warnings