Added libmimetic to build and moved methods from webpg-npapi
Fixes for output to JS-CTYPES and non-NPAPI usage