Adding macro to link external library to plugin.
Fix missing target in dynamic plugin mode.