Correctly compute the size of the needed memory for the datatype tests.
Fixes open-mpi/ompi#294.