Fix toArray assignment in stdfuns object

Also, compile CS->JS after the fix. ;)