Don't pass LDFLAGS when only performing compilation (-c)

As in #123, this is not necessary and may generate spurious warnings.