Use statvfs on NetBSD.

One field name in struct statvfs is different than one Solaris; adapt.
Fixes build on NetBSD, since statfs support was removed.
Please do the same `s/unsigned char/uint8_t/` for the other casts you're adding in this PR too, for the sake of consistency and shorter line length; thanks!