Building Julia from source on old Cray XE/XK system

Hi, as the title says, I’m building Julia from source on a Cray XE/XK system (Blue Waters). I keep getting compiler errors similar to "error: expected ')' before 'PRIx32'". They have to do with macros defined under inttypes.h. I can fix these by simply adding
#define __STDC_FORMAT_MACROS
to the offending *.cpp file. But there has to be a better way to configure this.

When I add -D __STDC_FORMAT_MACROS to Make.inc file, it doesn’t seem to have an effect. Neither does export __STDC_FORMAT_MACROS from the shell, or make CFLAGS=-D__STDC_FORMAT_MACROS.

Any suggestions on the proper way to globally set __STDC_FORMAT_MACROS ?

Edit: Also, first time posting here or any Discourse channel. If this is the wrong topic or tags, I’m happy to adjust.