Set default codec if header does not provide any.

Otherwise, upon decoding some objects, I encountered "TypeError: Cannot call method 'toString' of undefined" on datafile.js:333