Nigeria foils plot to oust president