fix left joins for rails < 4.1