Windows doesn't have M_PI; define it ourselves when needed.

This should fix the Windows build, broken by commit ed802e7d.