fix builds not having stdint.h
diff --git a/timsort.h b/timsort.h
index b9bda66..26ebe86 100644
--- a/timsort.h
+++ b/timsort.h
@@ -19,7 +19,16 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#elif defined(WIN32)
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#endif
+#endif
 
 #ifndef MAX
 #define MAX(x,y) (((x) > (y) ? (x) : (y)))