Synthesis of chitin derivatives and their metal complexes