Smarter way to find libs