Import fixes for python 3.x

Update imports so they also work in Python 3.x. Tested with Python 3.3.0 & 2.6.5.