Add -lm and -lrt flags to CMakeLists.txt

fixes #309