fix configure script

Cross compiling now uses LDFLAGS and LDFLAGS_FOR_BUILD, so fix the use
of that.