fix compile break on macos