Makefile: libraries belong to LDLIBS, not LDFLAGS.

Fixes build under Cygwin (and possibly others).