Design of observers with commutation-dependent gains for linear switching systems