Check for M_PI and define it if it's missing.