fix cmake build
no lock when calling callbacks, keep shared_ptr to
server object in callback to make sure it is not
 destroyed before callback