Stabilization of a class of stochastic systems with Markovian switching