Fix get a value from opts when less than Ruby 2.0.0

[OpenStruct support to the `[]` is Ruby 2.0.0 or later](https://github.com/ruby/ruby/blob/e44e356b53828d6468114b30e5c169296896f9b1/lib/ostruct.rb ).