UrlParser: tolerate port attribute being unset