Fixed builds on rails <= 3