Support ordered dictionnary

Now possible to create ordered dictionnary using 'to_dict' function with
the ordered parameter.