Add back support for content scale factor. Based on patch from Markus Stange.