A Kenyan court has released nine Somali men accused of piracy , saying it has no jurisdiction to try their case .