Added check for already defined NOMINMAX

If NOMINMAX is already defined I get a warning in Visual Studio. The fix is to define it only if not already defined.