Eliminate some compiler warnings

* Remove -Wno-discard-qual as it's not supported by all compilers
* Eliminate the cause of the discard-qual warning by modifying config.h
* Eliminate warning calling InterlockedCompareExchange by modifying config.h