Use LIBPBD_TEMPLATE_API and LIBPBD_TEMPLATE_MEMBER_API where appropriate
Add a couple of visibility specifiers that were missing