Add XML declaration to contents if not present