The to_string() functions are in the string.cpp source that is compiled
without debug, so the string is not registered, leading to a crash
later. A proper fix would be e.g. to move handling of this to a header,
but that'd change the ABI. Until that's fixed properly, at least
add a hack to handle it where possible.
Handles https://github.com/llvm/llvm-project/issues/55328 .