OS X 7 port and start of doc build fixes