better support for CPP/LDFLAGS environment variables in build