Fix two FTBFS on Mac OS X

Two more FTBFS remain, but I've found no fix for them yet and have worked around them.