Added explicit casts to make it 64-bit compatible (without any warnings).
Merge pull request #1 from jpteti/master

Added explicit casts to make it 64-bit compatible (without any warnings)