OSX compilation fixed

Support for OSX compilation added