Port module initialization code to Python 3.x C ext iface
Fixed compiler warning.