Principally enabled compiling on OS X.

Some examples have problems with XCode - to be fixed.