Add compatibility with Mac OS X and the BSDs

Makes unsquashfs and mksquashfs compile and run on Mac OS X 10.7 and higher, as well as the most recent versions of FreeBSD, OpenBSD, NetBSD and DragonflyBSD. They continue to work on Linux as well, of course.