Backports PR https://github.com/ARMmbed/mbedtls/pull/4948 to fix a regression with our macOS builds using Clang 12. Fixes #53297.