On some platforms (Haiku/BeOS) libm lives in libcore. Also added 'network' to the list of libraries to search for connect().