Ministat from FreeBSD user.bin/ with trivial modifications to build on Linux