clean up shared modules when dlclose()d