Fix compilation on linux and clang

Change-Id: I49b71ca6f48b849db9c8bbc1fd8a0687a0a05bb1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>