Fixes to get it working using make. A few warnings about deprecated string conversions.