Changed signature of add_flag to be more intuitive
Bug fixes and updated to work with zeromq 3.2.2