Fix platform version detection for Debian/Ubuntu

Fix platform detection for both `Ubuntu` and `Debian`.