Replaced boost::function with std::TR1::function due to a bug that prevents shared libraries from being unloaded.