Cellulose regeneration in ionic liquids: factors controlling the degree of polymerisation