osx related build fixes/kludges