You'll need to find a compiler of the same version as the target's libstdc++ was part of.
These ABI versions sometimes (not always) increase when new symbols are added to libstdc++.
Your best bet is in any case always to install the same OS version on your build machine. That is guaranteed to have the same toolchain version (although cross-compilers might differ there slightly).
Old answer follows. There is no package for GCC-4 so you'll have to install an older Ubuntu version.
It seems Ubuntu 18.04 has several GCC versions:
https://packages.ubuntu.com/search?keywords=arm-linux-gnueabihf&searchon=names&suite=bionic§ion=all
I'd try the newest one that works for your target. You can also compare the so version of libstdc++.so.X.Y.Z and make sure you use a GCC version with libstdc++ so version of maximum the one on your target machine.
If you're curious, the file defining these symbol versions can be found here: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/config/abi/pre/gnu.ver.
Looking further in that file, I found this commit: https://github.com/gcc-mirror/gcc/commit/c19175577e1cbf749590889441ad5dd03bb2c9d7
It adds the version of symbols you are missing, and Github marks this as being present in GCC 5. Unfortunately, Ubuntu 18.04 does not have a pre-5 GCC toolchain.