Fix FindCeres.cmake on linux to find pthread. Based on Ceres cmake script.
Only build Ceres tests if it is available.