Fixes 1.9.3 compatibility issue with NilClass#to_h.