Update export-csv.js

Updates borrowed from raveren/export-csv