Fix build error caused by cmake upgrade