Port from github.com/alecthomas/gozmq to work exclusively with ZeroMQ version 3