adjust promises to run on 0.8 and 0.6 versions of node