fix some xcode/g++ inconsistency