This is not a direct answer to your question. But a simpler (yet more naive) way to do what you want. Instead of using boost:share_ptr, I usually globally declare a pointer of type tf::TransformBroadcaster first. Next, In the main function, I use new to create the object after ros::init.
//Global Variable(s)