Better detection for libaries.