added code to support libraries that is mapped from the library by dlopen().