Fix native codecs

Fix inflate.js error handling, according to nahidakbar in issue #101
inflate|deflate.js: report error by throwing Error.
Why is this an `else if` instead of an `if`? The tested condition seems not to be mutually exclusive with line 2106.