Fixed #470. SQLAlchemy 0.7 support