Support Python 3.3

I went for the minimal option and tried to preserve the previous logic
as much as possible.

I target Python 3.3 so that I don't have to touch the u'' strings.