Measurement of $B \to D_s^{(*)} K\pi$ branching fractions