Fix compilation with Qt < 5.2

Change-Id: I8e8b29246274e0b358dad9f5596a64639f0255c5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>