fix #2. support ruby 1.9.x as welll as 1.8.7