OSX mods for mostly working port :)
dual osx/linux code-base