Handle systems that can't statically link

Build hosts like Mac OS X, and I'm sure others can't statically link.
So this change makes it possible to automatically detect that and build
libraries shared and put them in the right place.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>