[M108 Migration][WRTjs] Use BUILDFLAG(IS_XXX) for OS checking