I also checked archive SR-users.list and found question about same staff.
I installed kamailio from master branch on ubuntu 16.04 with small changes at tls module.
It gives same error but more clear result. (tested with default kamailio file - moved tls.so before ALL modules)
0(27545) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to set the memory allocation functions
0(27545) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl current mem functions - m: 0x7fab2a42d550 r: 0x7fab2a42dc40 f: 0x7fab2a42da70
0(27545) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure tls module is loaded before any other module using libssl (can be loaded first to be safe)
0(27545) ERROR: <core> [sr_module.c:607]: load_module(): /usr/local/lib64/kamailio/modules/tls.so: mod_register failed