fix waypoints.js for usage with browserify