Modifications for OSX

Changes required to compile code on OSX