Fix compilation errors with Mac Framework build