fork from https://github.com/bluekylin/libzmq