build.py: Fix extension build on macOS by finding libcmph installation
On macOS, libcmph can be easily installed using Homebrew or MacPorts so ensure the Python extension can be built on that platform by checking libcmph paths and updating compilation flags accordingly.