Allow waypoints to work with browserify by specifying window as root instead of just `this`