Make the Mac specific build stuff less fragile.