nmsg_io: Stored reference to cb functions to fix segfault.