Changes necessary to run on OS X