[API] Prevent unit test failures on Ruby 1.8