Misc Fixes

The primary issue is to add the compiler flag only if the compiler supports it.