Added proper library/header detection