checks for helpful compiler flags

Checks that compiler can handle some useful but not required
flags, this fixes compilation with older versions of clang