Fix acesss violation error on 32bit mingw build