Iran's Khamenei says Israel attack 'legal and legitimate'