Only set the homepage URL if the package contains this information

Otherwise we crash when assembling the XML and the resulting file does not validate.