Measurements of the branching fractions of charged B decays to K±π∓π± final states