Respect user's LDFLAGS

This is a patch to respect the user's LDFLAGS (such as -Wl,--as-needed). Also most of -m<flags> are not linking flags and are usually absorbed by the distribution compiler or cross-compiler.