Portfolio optimization in a hidden Markov model for stock returns with jumps