Influence of cationic molecules on the hairpin to duplex equilibria of self-complementary DNA and RNA oligonucleotides