Ensure the system libraries are linked against when -no-opengl is used

Task-number: QTBUG-40406
Change-Id: I1e166a5003f524cdeb4a53d78a382a6b11719b6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Merge remote-tracking branch 'origin/5.3' into dev

Change-Id: I6091afdf3d4ab71462dc42ef29e001ccd8ca627b
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev