Fixed Mac OS compilation errors/warnings