You're very unlikely to be able to build a binary that will run on both.
If you've got no choice but to try, you'll need to track down the packages for the older libraries and install them on your Fedora system. I wouldn't even think about going the other way.
You're in for a lot of downloading and package installing so reserve several hours for this task and the regular frustration you're going to experience.
You'd be much better off compiling a version of the executable on each system