Correcting Mac compilation errors