Compile fix: Link to math library also on CMake

This needs to be done at least on Xubuntu 13.10.