Fixed mac compilation errors.