Closes LIBZMQ-504.

This time correct backport from 3.x branch.
Merge pull request #79 from BoresExpress/master

Closes LIBZMQ-504.