compatibility fixes for MacOS Mavericks