Made front-end compatible with v8. Fix #147.