Fix PyGTK 2.16 compatibility issues (bug 1964)