Fix elftoolchain tools in-tree build

 * make variables static
 * add header for uint*_t typedefs
Temporarily disable non-FreeBSD NT_ note types
Track libarchive API change