Feature osx support

hacked together the compile.sh to handle osx