ruby 1.9 Struct has no to_h method