Add function to mt.h to generate elements of the finite field