Use different object files for libs and plugins.
This allows building a shared and static lib at once.