Magnetic properties of Co clusters deposited on Pt(111) and Au(111)