Make ipmi-discover not crash on Windows

This is really forward-porting patches from pebbles. See
https://github.com/crowbar/barclamp-ipmi/pull/55