revised encoding test to run under node 0.8