Scala 2.12 replaces Ordering.Double with either of Ordering.Double.TotalOrdering (same behavior, NaN compares consistently) or Ordering.Double.IeeeOrdering (consistent with java.lang.Double.compare, NaN always compares false, for example). Neither is available in both versions, and it doesn't seem like a compat library exists to handle this.
This can be accomplished by inlining the implementation of Ordering.Double so that both can use it. Or, parallel source trees for 2.12 / 2.13. The latter wouldn't be worth it just for this, but I'm fairly sure a few things will require it anyway.