Make more libs and apps compatible with Qt5.