Disable MigrationPreferenceInitializer in UI less environment

This class relies on UI classes which are not available in the test
suite for example.