Fix compilation of main and server