purple: fix compatibility with libpurple 3.x