Fix types for eq/eqv/equal-hash-code

Thanks to this SO question:
  http://stackoverflow.com/questions/26130215