build/mngids.py: make debugging output optional by setting the env
MNGIDS_DEBUG or not.

Fixes #125