Fix import scope for Python 3