cmake: fix issue with passing cxx_std option for GCC 11, a common workaround See merge request espressif/esp-idf!17362