fix get_distribution_version() on amazon linux

fixes hostname change on amazon linux (issue #8102)