Make qtdeclarative compile with -no-gui

Change-Id: I079f5e09a0099550348388379c496fc8f8cfa27c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>