Converts js_getter_proto to a C function for ~8% speedup.

You should fix the signature of getargs instead of casting away const.