Better handling of host platform detection