Implement a more rigorous dlsym() that works when the SSL library was loaded with RTLD_LOCAL.

Test case in test/rtld_local.c.