Make screen-resolution code compile on older Qt versions
(cherry picked from commit 2444d1f75f70b321dca6cda36d1965548e5ff5b0)