fix deprecated Buffer.write call for node 0.11.x