US judge grants habeas petition for Yemeni Gitmo detainee