Modified screen size calculation to support iOS 8.