fixed bug in encoding dicts

original code was using is_record/2 to check if Term is dict. Dict is now opaque so we switched to check for is_element(1,Term) == dict.
added option {minor_version,1} to term_to_binary which is the default since erlang release 17