Convert byte_buffer to ruby 1.8