Support newer Mingw

It seems I accdentally fixed MINGW support :)

It would be nice to have it "out of the box". It uses STD threads and DIRECT io by default on MINGW.

Tested on 
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.3/64-bit/threads-posix/sjlj/