add missing attributedNeededHeightForText method