Original code plus a more permisive flag for compiling in MacOS X