Enable compatibility w/ gcc/mingw64

These changes enable gcc/mingw64 compatibility.

Besides adding fixes of my own, the following changes were considered:
  https://github.com/parasti/OculusSDK-MinGW/commit/8fa94f4cc1d7e9d34a1908a4d69df52e5d998a20
  https://github.com/parasti/OculusSDK-MinGW/commit/b4681523477b15bea94379eb11b17be9daa7ac17
  https://github.com/larspensjo/OculusSDK-MinGW/commit/213118fdc1798a54b4efb930c3427b694abd8b31

  Big KUDOS to
    - Jānis Rūcis aka 'parasti'
    - Lars Pensjö aka 'larspensjo'