Fixes and documentation for building under OSX