Use Quasar's strupr and fix mingw-w64 compile

Note it still crashes