Fixed unicode problem in Python 2 / Properly support Python 3 (dropped unecessary im_func)