Fix Ruby1.9 compatibility