Do not link to librt if not available (e.g.: OS X)

In cab071ad, librt is linked, but this fails on OS X as there is no librt: `ld: library not found for -lrt`

I used the same condition as http://stackoverflow.com/questions/7695638/conditional-cmake-link-to-rt-library, maybe there is a better one.

BTW, why is `${CMAKE_SYSTEM_NAME} MATCHES "Darwin"` used instead of `APPLE`?
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#section_VariablesThatDescribetheSystem