Fix miscellaneous warnings from compiling with MinGW.

Note that MinGW defines NOMINMAX by default.
Merge pull request #1052 from SpecLad:ocl-mingw-warnings