Remove or replace deprecated glib functions.