Fix stubbing of unbound methods in python 3.