renaming semaphore_t to co_semaphore_t to avoid compilation errors on OSX
fixing OSX build for getting available memory size