Fixed import of __main__ to support python 2.6