Removed outdated code re: socklen_t on os_darwinos.h.

OS X has had socklen_t since 10.4, which itself has been EOL'ed for many
years now. The duplicate definition for socklen_t can fail with an error
of "conflicting types for ‘socklen_t’" on modern Macs when trying to use
the library.
Added flags for building .dylibs.

These are necessary for linking properly on OS X, BSD, etc.
Merge branches 'patch/shared-libraries' and 'patch/osx' of https://github.com/leedm777/pjproject