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

If the code is ok, in my opinion we need to get this upstream. Once this is merged in your fork, I will contact @freerobby to get all the code in.