Add library-registration code.