Added flags for building .dylibs.

These are necessary for linking properly on OS X, BSD, etc.