Fix compile warning due to -Wcast-qual.
Allow adding extra CFLAGS with a configure option.
This is a convenience option to pass in extra CFLAGS without overriding other
CFLAGS.