Ages of globular clusters: a new approach