ostruct.to_h only in ruby 2.0, using marshal_dump for compatibility