More readable platform detection logic