Fix build with vty 5 and vty-ui 1.8

Found while bumping vty on gentoo. I have added this patch in the overlay also.