Fixed compiling issues in mac.