Fix compatibility issues.

Make it runnable under Python 2.6 and Sublime 2.