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.