Fix unittests for Mac OS X