I can think of only one other slightly less sleazy and considerably more humane solution, which will certainly appeal to the administration's legion of lawyers. Let them go through trial, and as soon as they are set free immediately arrest them on a trumped up charge — illegal immigration comes to mind — and imprison them again. Conveniently, our immigration laws are so screwed up we could probably hold them just about forever if we can't find a country to deport them to. This really isn't any different than just leaving them in jail, but they do get a trial and we get a legal fiction to hide behind.
After thinking long and hard and not being able to come up with better solutions than these, I do know one thing for sure. I'm glad I'm not President Obama, because even if he has the wisdom of Solomon, I don't think he can find a solution any better than the ones I outlined. He's in a no-win situation and will pay a high price for whatever inevitably unsatisfactory resolution he finally selects.