move MIDP-related natives into midp.js