Fixes munged binary data

Fixes jembi/openhim-core-js#171