Use zmq_term instead of zmq_ctx_term when libzmq version < 4