forward-port emulation for recent pyzmq changes