Tweak autotools for OS X support