Corrected as_leading_term in hyperbolic functions (fixes #8455 )

fixes #8455