Python 2 compatibility fix: Don't use old-style classes