Add shared library support.

I don't see anything detrimental by being a shared library; but this is completely up to you. Some people don't like shared libraries for a variety of reasons; I personally don't like mixing and matching shared and static libraries when I build things.