Added build of agent as a shared library.