Fix inconsistent use of lower-case and upper-case names for macros
Use CHECK_C_COMPILER_FLAG to determine if the compiler supports a flag

This simplifies platform/compiler dependent checks where we optionally
enable features or disable warnings.