Fix sqlalchemy 0.8.x compatibility

In older versions of SQLAlchemy, <=0.8, `RelationshipProperty` is located inside `sqlalchemy.orm.properties` which makes the SQLAlchemny backend fail.