South African court rules against ICC withdrawal