Add java.io.IOException.
Fix #69: optimizeJS should be wrapped in anon function.

Since the code generated by Closure introduces variables
with arbitrary names in the global scope, we have to wrap
that code in an anonymous function so that they do not
erase variables defined by other libraries.