Fix compiler identification for flag selection

The name "clang" matches "cl" so we can no longer use that ancient
method of testing for MSVC.  Use modern compiler identification tests to
add compiler-specific C flags for building GCC code.

Reported-by: Sebastien Binet <binet@cern.ch>