Switch OpenStruct#to_h to #marshal_dump for 1.9

1.9 does not have #to_h, unnecessarily breaks compatibility downwards