Fix minor compilation errors when using ObjC++