Convert x-smtpapi params to json only if needed

This will ensure the gem does not break the code of existing
users for the gem