move embedded C main function code into external utility code file
fix compiler crash on "readonly" properties in "binding" mode