Judge clears way for civilian trial of Guantánamo detainee