I'm guessing this is on node.js v0.10.x ?
There must be a different implementation of the vm sandbox at that version. By default we do allow the basic js functions in, though we did have to add Buffer.
Testing the simple flow below does indeed show the problem using node.js v0.10 but works fine on node.js v0.12 and above...
[{"id":"bb7bd143.44843","type":"inject","z":"3812a366.c7ed5c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":540,"wires":[["8635a315.79ca6"]]},{"id":"cac516c3.353ae8","type":"debug","z":"3812a366.c7ed5c","name":"","active":true,"console":"false","complete":"false","x":500,"y":540,"wires":[]},{"id":"8635a315.79ca6","type":"function","z":"3812a366.c7ed5c","name":"","func":"var buf = new ArrayBuffer(2);\nbuf[0] = \"A\";\nbuf[1] = \"B\";\nmsg.payload = JSON.stringify(buf);\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":540,"wires":[["cac516c3.353ae8"]]}]