Fix build issues cause by LDFLAGS_FINAL changes