fix VarIterator for cmake build