compile fixes for MacOSX debug mode