Added a shared variant, that switches between shared and static library building, like with most cmake packages.