Rephrase the string(TIMESTAMP) implementation not to cause gcc-11 ICE on MSYS2/mingw32. Fixes: #22916