Fix compilation with -no-opengl

Change-Id: Ib8f39dcea58018f076d6a3fa733303958c707f1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>