Adds a compatibility layer for functions which changed either semantics or returns types between Decimal version 1.x and 2.x.
@spec compare(Decimal.t(), Decimal.t()) :: :eq | :lt | :gt