fix error when build with xcode