Portability fixes.

Tested Compiling with GCC, Clang, 32/64 bit variants.
Lots of size_t fixes.
Improved detection of Windows platform.
Supported building Windows target with different compilers.
MFSound changes to use size_t throughout.