I think openexr upgrade was held back mostly by un-buildability on old distros with old gcc/cmake?
I think I even overcomplicated this part because there was IMMATH_HEADERS=$(pkg-config --cflags Imath 2>/dev/null) variable above this, basically unused.
That is true that 3.1.4 would not build on the older distros BUT what I was trying to do was build without openexr and Imath on the older distros and it would not take "no" for an answer. I tried "--without openexr", "--without Imath", and no matter what I tried, it would just keep trying to build Imath anyway.