Updated library to work with OSX