Fix compilation with ./build-linux-gtk.sh

plus fix a couple implicit declarations that truncate pointers on 64bit.
it seems upstream code was not tested without JIT and NATMEM_OFFSET in a while, it would be best if we get the related changes upstream