fix resolving symbols in objects loaded in RTLD_LOCAL mode