A Markov-switching model for heat waves