Reintroduce M_PI compatibility M_PI is not part of C99 or C++ and thus aren't provided in all configurations. This used to be handled in reference_math.c directly but was recently removed. Just tweak the M_PI handling in the compatibility headers to restore builds.