A characterization of semicontinuous representability of interval orders