Fix compilation errors on newer Linux systems

 * getpid() (from libc) needs <unistd.h>
 * g_type_init() (from glib) is now deprecated

These affect Ubuntu Quantal onwards

Change-Id: Ibebed74a3a244fa63c3bb16d75bd45e0a8ae371c