Make distro detection more robust

lsb_release is not always installed so we need a fallback detection method