s3: Replace IS_DOMAIN_OFFLINE by a function