A plot to kill Burkina Faso's military leader, Capt Ibrahim Traoré, has been thwarted, the West African nation has announced.