Make Python bindings actually optional
Fix build using i686-w64-mingw32

This commit fixes some header file and library name casing mistakes,
and explicitly links in libpthread where necessary.
Make CC and RC overridable

This is required to build using i686-w64-mingw32.