Implement add_library.