Fix build problem on FreeBSD

 1. gdm-session-worker needs -lutil.
 2. #include <sys/types.h> is needed to get uid_t.
 3. #include <netinet/in.h> is needed to get several struct.

https://bugzilla.gnome.org/show_bug.cgi?id=722594