add default c++ terminate() in library.js