Update javascript bindings for use with SWIG 3.0.1+

Still requires special branch from @lefticus, but that should get
remedied hopefully with the next release of SWIG