Fixes to generate_jsb.py.

Fix KeyError and add conversion from NSDictionary for callback arguments.