configure: support for EXTRA_CFLAGS and EXTRA_LDFLAGS