IsPluginEnabledForTarget() always returns false for optional plugins

Steps to Reproduce
1) Mark a plugin dependency in your uproject as “optional”

2) Test IsPluginEnabledForTarget() in the projects build.cs, it will be false even if the plugin is currently enabled.