Improve compatibility with singledispatch

Discussed in https://github.com/mrocklin/multipledispatch/issues/23
We could also consider sending this function through a deprecation cycle.