Build a very simple shared library.

This pull request creates libstmd.so with very few tweaks to the build system. It isn't intended to be the simplest patch that gives us a usable shared library.