The role of carboxyl groups in eumelanin and pheomelanin properties