Add OS X target supported via conditional compilation
Merge branch 'os-x' into HEAD