Check /sys/class/net/{device}/wireless first when checking for Wi-Fi devices.
If there's a /sys/class/net/{device}/wireless directory for {device},
then it's a Wi-Fi device; check that first, and only use the wireless
extensions if that directory doesn't exist, to handle kernels that don't
have /sys or do but don't have /sys/class/net/{device}/wireless
directories. That way, we don't depend on Wi-Fi devices (or the kernel)
supporting the wireless extensions, at least for newer kernels.