Add Mac OS X support to the buildsystem