Make it build (cleanly) on modern gcc
Make it possible to cross-compile it too