Fixed compiling/linking on OS X

I wasn't able to build ptsminer on OS X due to a couple of casting issues and yasm outputting the wrong object format. LLVM wasn't happy using `llvm-g++` to compile C files. These changes fix the build, but there seem to still be some concurrency issues that I didn't have much luck debugging. Running on 1 or 2 threads seems to work fine, but any more than that drops c/m to less than 1. Let me know what you think; hopefully this is useful to someone.