make myldflags consistent between makefile.in and configure.in
fix library detection in configure.in