altoslib: Close serial port when AltosFlash fails to detect a target