Fixed cast for 32-bit windows.
Merge pull request #221 from cmars/win32

Fixed cast for 32-bit windows.