M&S profits halved after cyber-attack