Copyed the new improvements to linux building over to OSX, running in xcode does'nt work right now though