changes from cpp-ethereum

changes made by gav in cpp-ethereum's main.js
https://github.com/ethereum/cpp-ethereum/commit/d395b82f1b5705807048162430f4d3d28c504169#diff-1