app: add some CPPFLAGS in core/Makefile.am to fix the build on OSX