Fix ES6 hook to work in node_modules