Fix build error

BuildBot error was caused by
* Lack of Qt5 dependency
* Incorrect configure.ac AM_CONDITIONAL usage