Fix build on mingw

* Fix build that missing intptr_t
* Add Makefile for mingw