Add ToJSON and FromJSON instances for Scientific