expose typeof via emscripten::val

Per request on the mailing list.