cmake fix for libraries levmar and sparseLM when not used