Fix compilation for 64-bit (serializing type with to/fromJson to JSON string).