Support for CGMiner 3.1.1

Code I had to change to support my GPU mining on CGMiner 3.1.1