cope with compile errors

I had some problems building this on Archlinux. These changes allowed the build to complete