Various tweaks to make things run on Mac OS.
The main change is the use of pthread to implement ffork.
diff --git a/src/lib9/sysfatal.c b/src/lib9/sysfatal.c
index f9ab698..33a533b 100644
--- a/src/lib9/sysfatal.c
+++ b/src/lib9/sysfatal.c
@@ -14,6 +14,7 @@
 	vseprint(buf, buf+sizeof buf, fmt, arg);
 	va_end(arg);
 
+	__fixargv0();
 	fprint(2, "%s; %s\n", argv0 ? argv0 : "<prog>", buf);
 	exits("fatal");
 }