Backport casting fix for MSVC compilation from zyre
Merge pull request #115 from twhittock/master

Backport casting fix for MSVC compilation from zyre