Fix issue with canvas parameters

texImage2D, texSubImage2D and drawImage are overloaded to accept a lot of different combinations. Update the wrappers to correctly handle all the current overloads.

Fixes #283