fix measureHeight method in iOS 7