fixed "encoding already set" test to accomodate node versions >0.8 but
<0.10.6