Stabilisation of non-canonical structures of nucleic acids by metal ions and small molecules