Merge pull request #347 from ddobrev/master

Fixed a memory problem in generated code. Mapped void* to IntPtr
Fixed an ambiguity between an internal ctor and a potential wrapped one.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>