fixed detect_distro() on OS X and Windows