Fixed bayesgraph.cpp compilation error under MPI