fix compile error in non-C++11
Support ruby 1.9