Magneto-elastic effects in compressed cobalt from first-principles