Add portable way to check for the existence of definitions and
apply it to socklen_t.
patch by Dave Yeo, daveryeo telus net

Originally committed as revision 11366 to svn://svn.ffmpeg.org/ffmpeg/trunk
