add POSIX build flag for gcc
clean build for POSIX examples on mac and linux
fixes for auto-re-observe