Use NOMINMAX define vs. custom define to avoid min() conflict.