Modifications to compile on osx