improved Windows detection