Clone of https://bitbucket.org/ambv/singledispatch for Travis-CI purposes.