Markov-modulated mean-variance problem for an insurer