Fix compilation on XCode

-fnested-functions is needed with both clang/gcc on OSX