Use OPTIONAL_COMPONENT_SWITCH for attribute plugin

Best to test with and without on Travis.
Merge pull request #649 from gadomski/optional-component-switch-on-plugins

Use OPTIONAL_COMPONENT_SWITCH for plugins on Travis