Generic approach to detect versioned Qt executables.

Fixes build on CentOS 6.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>