Ivorian military foils coup plot