LDLIBS is the proper variable to put -lfoo type flags
Might as well make the code simpler