fix compiling error on iOS