Officials in Nairobi say Somali pirates have released a vessel with its crew , after holding it for almost two months .