mingw64 support 

This are the changed that allow to make mingw64 work