Added check for already defined NOMINMAX

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