Backport casting fix for MSVC compilation from zyre

As discussed in https://github.com/zeromq/zyre/pull/243