Iran’s top judge says 'legitimate' protests must be heard