Updated code to build with current library versions, by using stringToGlib and adding an explicit "String" typing.