Updated code

Added #ifdef to allow same code base on windows or Mac.  Next step will
be to merge the VS solution to the Xcode project folder - so only one
folder required regardless mac or windows development.