Use environment variable instead of macro for enabling debug mode

This will help preventing accidental debug commits