Makefile.in: add LIBS handling

In the autoconf universe LDFLAGS are used for all linker flags, and
LIBS are used to specify additional libraries. Autosetup has support
for that but Makefile.in needs to honour them too.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>