fix cmake bug when building without mpi enabled