Code:
alias IsWine {
  .comopen winetest WbemScripting.SWbemLocator
  if ($com(winetest)) { .comclose winetest }
  return $comerr
}

alias test {
  if ($IsWine) { echo -st Running under Wine @ $OS } 
  else { echo -st Running under Windows $OS }
}


I'm not sure if it will be acurate all times, but atm is working for me...