fixes for building and running on macosx
code available for xcode compile, but i have no idea how to get the project in the repo properly