Egypt extends detention of ex-justice minister