Apply a few fixes from a Fedora 19 run