Make `unsafeCompare` "FFI-safe"

Had to curry it manually as we don't have Fn5 accessible in `Prelude` without importing `Data.Function`, and then you get the circular module dependency issues.
May as well make this

```
forall a o. o -> o -> o -> a -> a -> o
```