Change magic that finds libraries to compile with so it works with clang, too