It sounds like some kind of reference to jQuery gets passed as a parameter there, and I believe C2 object sealing prevents the usage that is done in the library you add.
It's a wild guess, but I believe posting the whole files would help to make sure the integration was made correctly.
More about object sealing and jQuery usage in the SDK.
As a solution, you might also want to take a look at R0j0hound's canvas plugin which should allow you drawing of basic shapes as you're aiming for.
I'm not sure it's a jCanvas (more like a regular <canvas>) but it should do the trick.