Somali immigrant gets 10 years in terror plea