Attempt at improving device detection on Windows.