fix LINKFLAGS when cross-compiling