handle NOMINMAX in cmake