fix compile bug on xcode.