fix bug in python2 implementation of extension module import mechanism
fix bug in python2 implementation of extension module import mechanism

(cherry picked from commit 0c92f8334020624ad5d597ad4021e93c4ace78dc)

kblomqvist/yasha