fmt 12.2.0 changes the meaning of fmt/core.h so it no longer includes
fmt::format, so this upstream commit switches to the correct header.
this backports the relevant parts of an upstream commit as upstream has
diverged significantly from 7.2.3:
e2f588592e