fix compile error on older mac osx