fix signing bug in original NXT implementation (https://gist.github.com/doctorevil/9521116)