Common JS API: minor fix for handmade js modules