Fixes for compiling on Fedora

These errors were found while compiling on Fedora, but likely affect many systems.