Adds the ability to output element attributes when converting to hash.  This helps when the resulting object needs to be flattened