Support building a shared library
Merge pull request #13 from jbergstroem/shared

cmake: Support building a shared library