make the api ruby 1.9 compatible