Adapt to the change in detect_ostype() behavior

Change-Id: I95c1c6654e25313079824bdcdf1a8b354e60790a