cmake: fix server build error under linux