Improving mpi linking. It will now work with openmpi as well.