fixed compile error on osx