Ensure to protect the "use mpi" build properly

cmr=v1.7.4:ticket=4162