JS backend: minor fixes in k2js stdlib.