Fix compilation error on macos