(OSX) Some build fixes