Cast dict values to string before quoting them

The SQL hstore function requires key and value of type text.