fix compile error on Xcode