Ages and metallicities of Hickson compact group galaxies