Update canvas2image.js

add  :
```
if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
```