Fix computing line height for generic boxes and images.