Draw smooth curves with HTML5 Canvas