Synthesis of a hybrid moving horizon observer for switching dynamic systems