Observer-based stabilization of linear switching systems