Extended support for mac os x submodules

Changed code to determine os platform