More fixes for linux build.

Added cmake vars to make it easier to switch on/off platform specific options.
Compiles upto *.proto compiles, then failes on *.py scripts.