cmake: fixed build on Mac OS X