[CMake] Check that compiler supports -fno-function-sections flag