strdup isn't standard but g_strdup is provided by glib