build: fix warning + other small fixes.

https://github.com/veox/cgminer/pull/3