fix NPE when a config.xml is missing preferences

A NPE can occur during plugin installation when replacing variables if a
config.xml does not have preferences.