Support API change for SQLAlchemy 0.8