Fix osx build

Updated to build library correctly on OSX. Have tested by manually linking into sfArkXTm - have not yet fixed that build.

make install still not quite right on osx.

Fixes #1