Security Council has a 'problem of legitimacy': UN chief