Added options to allow compilation on OS X