Fix several compiler warnings and build issues detected with Fedora 24 builds.