CLI backend will respect calling convention when creating a delegate

just looking at the commit and should probably add a test case incl. some code for csharp backend?