[Issue 10123] Allow compilation with new compilers