Weak-lensing $B$-modes as a probe of the isotropy of the universe