fix compile error for xcode