Make it compatible with Node.js

1. Don't use global variable "contours" in Tess2.tesselate()

From:
tess.addContour(opts.vertexSize || 2, contours[i]);

To:
tess.addContour(opts.vertexSize || 2, opts.contours[i]);

2. Node.js compatibility

From:
(function(global) {
// ...
}(this);

To:

(function(global) {
// ...
}((typeof(window) === 'undefined') ? module.exports : window));