Fix serialization if gem json >= 1.5.5 used