Risken–Nummedal–Graham–Haken instability in class-B lasers