Encode/decode FormData and FormDataElement objects consistently