Added shared to mainlib's includes
Removed SIGABRT handler to stop terminate called recurively error. Handle fn left in for now but should be looked at
Added lock on zmq send to prevent segfaults and other weirdness