fixed a bug in compiling profile tool under macos