Fix a compilation issue with GCC 12 on macOS.