backport of zeromq/libzmq#721 In the discussion, it was decided to backport, but that never actually happened. test file was renamed after the above PR, so the version from master is pulled in here.