[ #26649 ] Make compatibility changes to make the Qt library build on Qt5

There seem to be issues with linking on Qt4, it will be fixed in the next commit