Fixing plugin detection when adding a library