Add compatibility with ZeroMQ 3+.

The ZeroMQ 3 release contained some breaking changes.  I've tested this against 4.0.4, seems to work.