Minor changes
Adapt to work in either cgminer or BFGMiner