Some cross-platform code cleanups.

Fixes for MinGW and clang with HS_DEBUGGING enabled.
Checking if something is compiled on MSVC is not the same as checking whether debugging is enabled...  I'm not quire sure I understand what this change is supposed to be doing