Build shared libraries

If the snopt option is used properly then shared libraries can
be built.