Basis Functions for Divergence Constraints in the Finite Element Method