Fix build error when compiling with mingw uintptr_t must be defined when including valgrind.h, just move it as last include solves the problem. https://bugzilla.gnome.org/show_bug.cgi?id=796283