Modified build to be compatible with Mac OS X