Added an optional onAfterImport hook for customizing imported libraries